var http = require('http');
var db = require('./src/sqlite');

http.createServer(function (req, res) {
	res.writeHead(200, {
		'Content-Type': 'text/html;charset=utf-8'
	});
	db.show(5, function (logArr) {
		res.end(JSON.stringify(logArr));
	});
}).listen(process.env.PORT || 1337, null);